
<div class="right_side_operate_area">
	<?php  
		$user=$session->read('User');
		$isflag=true;
		//if($user['isadmin'] || $user['isgroupadmin']){
		//	$isflag=true;
		//}
		if($showpage==1) {
			if(isset($paging)) { echo $this->renderElement('pagination',$paging);} 
		}
	?>

	<div class="right search_box">
		<form onsubmit="return searchinfo('search_colleage')">
	    	<div class="left search_text"> 
	    		<?php echo $form->text('colleage.keyword',array('placeholder'=>'搜索高校名称','value'=>$keyword, 'id'=>'search_colleage', 'class'=>'text_box', 'autocomplete'=>'off'));?>
	    	</div>
	        <div class="left search_btn"><input type="submit" value=""/></div>
        </form>
        <div class="clear"></div>
    </div>
   
    
     <?php 
    	if($isflag){
    		echo '<div class="right item_add_btn">';
			echo $html->link(__("Add",true),"/colleages/editcolleageinfo/");
			echo '</div>';
		}else{
			echo '<div class="right enableaction">';
			echo "<a>添加</a>";
			echo '</div>';
		}
	?>
    <div class="clear"></div>
</div>


<div class="right_side_scollbar">
    <div class="detail_info_panel">
    		 <div class="items_list">
    		 		<table>
    		 			<tr>
    		 				<th>高校名称</th>
    		 				<th>负责人</th>
    		 				<th>联系电话</th>
    		 				<th>操作</th>			
    		 			</tr>
    		 			
    		 			<?php
    		 					foreach($colleages as $colleage)
    		 					{
    		 						$id = $colleage["Colleage"]["id"];
    		 						$colleage_name = $colleage["Colleage"]["colleage_name"];
    		 						
    		 						echo "<tr class='per_list'>";
    		 						echo "<td>".$html->link($str->sub_len($colleage_name,20),"/colleages/showcolleageinfo/".$id,array("title"=>$colleage_name),null)."</td>";
    		 						echo "<td>".$colleage["Colleage"]["contact"]."</td>";
    		 						echo "<td>".$colleage["Colleage"]["tel"]."</td>";
    		 						echo "<td>";
    		 						$email = base64_encode($colleage["Colleage"]["email"]);
									if($isflag)
									{
										echo $html->link(__("Edit",true),"/colleages/editcolleageinfo/".$id,null,null);
										echo $html->link(__("Delete",true),"/colleages/delcolleageinfo/".$id."/".$email,array("onclick"=>"return doaction(this)"));
									}
									else
									{
										echo "<span class='enableaction'>编辑</span>";
										echo "<span class='enableaction'>删除</span>";
									}
									echo "</td>";
    		 						echo "</tr>";
    		 					}
    		 			?>
    		 		</table>
    		 </div>
    </div>
 </div>
 
<?php echo $this->element('actionconfirm',array("title"=>"删除提示","message"=>"你确定要删除吗？")) ?>
<?php echo $this->element('autocomplete',array("model_name"=>"Colleage","field_name"=>"colleage_name","widget_name"=>"search_colleage")) ?>